import com.hnuit.dao.UserDaoImpl;
import com.hnuit.entity.User;
import com.hnuit.service.UserServiceImpl;

public class UserServiceTest {
    public static void main(String[] args) {
        //声明UserServiceImpl类实例
        UserServiceImpl userService = new UserServiceImpl();

        // 创建UserDaoImpl实例并设置到UserServiceImpl中
        UserDaoImpl userDao = new UserDaoImpl();
        userService.setUserDao(userDao);

        //声明User类实例
        User user = new User("zhangsan",1111,"123456");
        boolean login = userService.login(user);
        if(login)
            System.out.println("登录成功");
        else
            System.out.println("登录失败");
    }
}